package com.emode.action;

import java.util.HashMap;
import java.util.Map;




import com.emode.base.BaseAction;
import com.emode.entity.StatisticsV;
import com.emode.util.CommonUtils;
import com.emode.util.cache.EhcacheUtil;

public class StaticAction extends BaseAction<StatisticsV> {

	/**
	 * 获取论坛的基本信息
	 */
	private static final long serialVersionUID = 8687634272873949835L;
	
	public void getStatic(){
		StatisticsV statics = 	(StatisticsV) EhcacheUtil.get("siteInfo", "siteInfo");
		if(statics==null){
			statics = 	statisticsVService.getById(1);
			EhcacheUtil.put("siteInfo", "siteInfo", statics);
		}
		Map<String, String> data = CommonUtils.getValueMap(statics);
		//CommonUtils.get
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("static",data);
		CommonUtils.returnMapToJson(map);
	}
	
	
	/*Map<String, Object> getStatic(){
		StatisticsV statics = 	statisticsVService.getById(1);
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("static",statics);
	//	CommonUtils.returnJson(map);
		return map;
	}*/

}
